package com.winhxd.b2c.common.domain.order.enums;

/**
 * 售后类型
 *
 * @author hjw
 * @create 2019-01-07 16:30
 **/
public enum AfterSaleTypeEnum {

    /**
     * 正常
     */
    NORMAL(0,"正常"),
    /**
     * 待发货-退款
     */
    WAIT_DELIVERING_REFUND(1,"待发货-退款"),
    /**
     * 待发货-取消退款
     */
    WAIT_DELIVERING_CANCEL_REFUND(2,"待发货-取消退款"),
    /**
     * 待收货-取消换货
     */
    WAIT_RECEIVING_EXCHANGE(3,"待收货-换货"),
    /**
     * 待收货-取消换货
     */
    WAIT_RECEIVING_CANCEL_EXCHANGE(4,"待收货-取消换货"),
    /**
     * 待收货-退款
     */
    WAIT_RECEIVING_REFUND(5,"待收货-退款"),
    /**
     * 待收货-取消退款
     */
    WAIT_RECEIVING_CENCEL_REFUND(6,"待收货-取消退款"),
    /**
     * 待收货-退款退货
     */
    WAIT_RECEIVING_REFUND_AND_RETURN(7,"待收货-退款退货"),
    /**
     * 待收货-取消退款退货
     */
    WAIT_RECEIVING_CANCEL_REFUND_AND_RETURN(8,"待收货-取消退款退货"),
    /**
     * 已完成-退款
     */
    FINISHED_REFUND(9,"已完成-退款"),
    /**
     * 已完成-取消退款
     */
    FINISHED_CENCEL_REFUND(10,"已完成-取消退款"),
    /**
     * 已完成-换货
     */
    FINISHED_EXCHANGE(11,"已完成-换货"),
    /**
     *已完成-取消换货
     */
    FINISHED_CENCEL_EXCHANGE(12,"已完成-取消换货"),
    /**
     * 已完成-退款退货
     */
    FINISHED_REFUND_AND_RETURN(13,"已完成-退款退货"),
    /**
     * 已完成-取消退款退货
     */
    FINISHED_CANCEL_REFUND_AND_RETURN(14,"已完成-取消退款退货");

    private Integer typeCode;
    private String typeDesc;

    public Integer getTypeCode() {
        return typeCode;
    }

    public String getTypeDesc() {
        return typeDesc;
    }

    AfterSaleTypeEnum(Integer typeCode, String typeDesc) {
        this.typeCode = typeCode;
        this.typeDesc = typeDesc;
    }

    public static AfterSaleTypeEnum getAfterSaleTypeEnumByCode(Integer typeCode) {
        for (AfterSaleTypeEnum afterSaleTypeEnum : AfterSaleTypeEnum.values()) {
            if (afterSaleTypeEnum.getTypeCode().intValue() == typeCode.intValue()) {
                return afterSaleTypeEnum;
            }
        }
        return null;
    }

}
